import 'package:flutter/cupertino.dart';
import 'screen_adapter.dart';

/// *
///                    .::::.
///                  .::::::::.
///                 :::::::::::
///             ..:::::::::::'
///           '::::::::::::'
///             .::::::::::
///        '::::::::::::::..
///             ..::::::::::::.
///           ``::::::::::::::::
///            ::::``:::::::::'        .:::.
///           ::::'   ':::::'       .::::::::.
///         .::::'      ::::     .:::::::'::::.
///        .:::'       :::::  .:::::::::' ':::::.
///       .::'        :::::.:::::::::'      ':::::.
///      .::'         ::::::::::::::'         ``::::.
///  ...:::           ::::::::::::'              ``::.
/// ```` ':.          ':::::::::'                  ::::..
///                    '.:::::'                    ':'````..
///
/// Created by Wongxd on 2020/5/19.
/// https://github.com/Wongxd
/// wxd1@live.com
///
extension Gap on num {
  get vGap => Container(height: this.asHeight);

  get hGap => Container(width: this.asWidth);

  Widget gapV(Color color) {
    return Container(
      height: this.asHeight,
      color: color,
    );
  }

  Widget gapH(Color color) {
    return Container(
      width: this.asWidth,
      color: color,
    );
  }

  get vGapDp => Container(height: this.toDouble());

  get hGapDp => Container(width: this.toDouble());

  Widget gapVdp(Color color) {
    return Container(
      height: this.toDouble(),
      color: color,
    );
  }

  Widget gapHdp(Color color) {
    return Container(
      width: this.toDouble(),
      color: color,
    );
  }

}
